package project_2;

import GPDatagram;

public class testDatagram {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		GPDatagram temp = new GPDatagram(28,2,3,67548, (new byte[12]));
		
		/*System.out.println(temp.getLength() + " " + temp.getCoords().getFirst() + " " + 
				temp.getCoords().getSecond() + " " + temp.getPort() + " " + temp.getPayload().length);
		*/
		
		byte[] tempArr = temp.getGPDatagram();			
		int wordCounter = 0;
		
		for (int i=0; i<tempArr.length; i++){
			System.out.println(tempArr[i]);
			wordCounter++;
			if (wordCounter == 4){
				System.out.println("Break");
				wordCounter=0;
			}
		}
		
		System.out.println("\n\n");
		
		for (int i=0; i<16; i=i+4){
			int tempValue = GPDatagram.convertByteToInt(tempArr, i);
			System.out.println(tempValue);
		}
		

	}

}
